public class FizzBuzzConverter {
    private static final int RANGE_MIN = 1;
    private static final int RANGE_MAX = 100;
    private static final int THREE = 3;
    private static final int FIVE = 5;
    private static final int SEVEN = 7;

    private static final String THREE_STR = "3";
    private static final String FIVE_STR = "5";
    private static final String SEVEN_STR = "7";


    public void main() {
        fizzBuzz();
    }

    public void fizzBuzz() {
        for (int i = RANGE_MIN; i <= RANGE_MAX; i++) {
            String resultSingle = convert(i);
            System.out.println(resultSingle);
        }
    }


    public static String convert(int number){
        String result = "";
        String numberString = String.valueOf(number);
        boolean isContains3 = numberString.contains(THREE_STR);
        boolean isContains5 = numberString.contains(FIVE_STR);
        boolean isContains7 = numberString.contains(SEVEN_STR);
        if (isContains3 && !isContains5) {
            return "Fizz";
        }
        if (number % THREE == 0 && (!isContains5 || isContains7)) {
            result += "Fizz";
        }
        if (number % FIVE == 0 && !isContains7) {
            result += "Buzz";
        }
        if (number % SEVEN == 0) {
            result += "Whizz";
        }
        return String.valueOf(number);
    }
}
